package io.ticktick.modules.app.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import io.ticktick.modules.app.dao.ChatHistoryDao;
import io.ticktick.modules.app.entity.ChatHistoryEntity;
import io.ticktick.modules.app.service.ChatHistoryService;


@Service("chatHistoryService")
public class ChatHistoryServiceImpl extends ServiceImpl<ChatHistoryDao, ChatHistoryEntity> implements ChatHistoryService {


    @Override
    public List<ChatHistoryEntity> getChatHistory(Long userId) {

        return this.list(new QueryWrapper<ChatHistoryEntity>().eq("sender_id", userId).eq("talker_id", userId));

    }
}